package com.deyuanyun.pic.ctrl.mapper;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;


/**
 * 阴保测试仪表板的拓展Mapper
 * 
 * @author ChenKui
 * @date 2016-06-21
 *
 */
public interface CpTestDashboardExpandMapper {
    
    
    /**
     * 查询阴保测试桩保护率
     * 保护率=（总测试桩个数-欠保护测试桩个数）*100%/总测试桩个数
     * 
     * @param pipeLineId
     * @param beginMileage
     * @param endMileage
     * @return 返回的Key：ALL_COUNT总/COUNT_Q欠
     */
    Map<String,BigDecimal> queryCpTestStationProtectionRatio(@Param("pipeLineId")String pipeLineId,@Param("beginMileage")Integer beginMileage,@Param("endMileage")Integer endMileage);  
    
    

    /**
     * 查询阴保测试桩运行率
     * 近12个月的数据。
     * 
     * @param pipeValveroomIds
     * @return 返回的Key：AVG_OPERATINGRATIO*100/100=运行率
     */
    Map<String,BigDecimal> queryCpTestStationOperatingRatio(@Param("pipeValveroomIds")String[] pipeValveroomIds);
    
    /**
     * 查询 阴保测试桩的 通电/断电/自然电位
     * @param pipeLineId
     * @param beginMileage
     * @param endMileage
     * @return
     */
    List<Map<String,Object>> queryCpTestStationRecode(@Param("pipeLineId")String pipeLineId,@Param("beginMileage")Integer beginMileage,@Param("endMileage")Integer endMileage);
    
}